import request from '@/utils/request'

// 查询字典数据列表
export function listMilkDict (query) {
  return request({
    url: '/system/milkDict/list',
    method: 'get',
    params: query
  })
}

// 查询数据字典选项哦
export function getMilkDictOp (query) {
  return request({
    url: '/system/milkDict/getMilkDict',
    method: 'get',
    params: query
  })
}

// 查询字典数据详细
export function getMilkDict (dictCode) {
  return request({
    url: '/system/milkDict/' + dictCode,
    method: 'get'
  })
}

// 新增字典数据
export function addMilkDict (data) {
  return request({
    url: '/system/milkDict',
    method: 'post',
    data: data
  })
}

// 修改字典数据
export function updateMilkDict (data) {
  return request({
    url: '/system/milkDict',
    method: 'put',
    data: data
  })
}

// 删除字典数据
export function delMilkDict (dictCode) {
  return request({
    url: '/system/milkDict/' + dictCode,
    method: 'delete'
  })
}


// 新增字典数据
export function saveAddress (data) {
  return request({
    url: '/system/milkDict/saveAddress',
    method: 'post',
    data: data
  })
}
